<?php
namespace api\modules\v1\controllers\goods;

use api\modules\v1\models\GoodsCreateForm;
use api\modules\v1\models\GoodsUpdateForm;
use backend\widgets\provinces\Provinces;
use common\models\goods\Goods;
use yii\data\ActiveDataProvider;
use Yii;
use yii\web\NotFoundHttpException;
use api\controllers\OnAuthController;
use common\enums\StatusEnum;
use common\helpers\ResultDataHelper;
use common\models\store\Store;

/**
 * 商品接口
 *
 * Class InfoController
 * @package api\modules\v1\controllers\goods
 * @property \yii\db\ActiveRecord $modelClass
 * @author tjj
 */
class InfoController extends OnAuthController
{
    public $modelClass = 'common\models\goods\GoodsCommon';

    /**
     * 权限验证
     *
     * @param string $action 当前的方法
     * @param null $model 当前的模型类
     * @param array $params $_GET变量
     * @throws \yii\web\BadRequestHttpException
     */
    public function checkAccess($action, $model = null, $params = [])
    {
        // 方法名称
//        if (in_array($action, ['delete', 'index']))
//        {
//            throw new \yii\web\BadRequestHttpException('权限不足');
//        }
    }
}
